home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 12 / boot-disc-1997-08.iso / Media / Demos.dxr / Lingo Lib_9.ls < prev    next >
Encoding:
Text File  |  1997-06-12  |  1.1 KB  |  47 lines

  1. on getDrivePC
  2.   set curpath to the moviePath
  3.   set olddelimiter to the itemDelimiter
  4.   set the itemDelimiter to "\"
  5.   set drive to item 1 of curpath & "\"
  6.   set the itemDelimiter to olddelimiter
  7.   return drive
  8. end
  9.  
  10. on getDriveMac
  11.   set curpath to the moviePath
  12.   set olddelimiter to the itemDelimiter
  13.   set the itemDelimiter to ":"
  14.   set drive to item 1 of curpath & ":"
  15.   set the itemDelimiter to olddelimiter
  16.   return drive
  17. end
  18.  
  19. on checkFile
  20.   global myFile
  21.   set myFile to new(xtra("fileio"))
  22.   set textName to the pathName & "browser.txt"
  23.   openFile(myFile, textName, 0)
  24.   if voidp(textName) then
  25.     selectWeb()
  26.   else
  27.     delete(myFile)
  28.     selectWeb()
  29.   end if
  30. end
  31.  
  32. on selectWeb
  33.   global myFile
  34.   set myFile to new(xtra("fileio"))
  35.   set fileName to displayOpen(myFile)
  36.   put fileName into field "browserSelect"
  37.   set myFile to 0
  38.   set myFile to new(xtra("fileio"))
  39.   set textName to the pathName & "browser.txt"
  40.   createFile(myFile, textName)
  41.   set vWeb to field "browserSelect"
  42.   openFile(myFile, textName, 0)
  43.   writeString(myFile, vWeb)
  44.   closeFile(myFile)
  45.   set myFile to 0
  46. end
  47.